﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;

namespace LowLevelGraphics.Filter
{
    /// <summary>
    /// 
    /// </summary>
    public class Neighbour
    {
        private int m_nXOffset = -1;
        private int m_nYOffset = -1;
        private Pixel m_Pixel = null;

        /// <summary>
        /// Initializes a new instance of the <see cref="Neighbour"/> class.
        /// </summary>
        /// <param name="_nXOffset">The _n X offset.</param>
        /// <param name="_nYOffset">The _n Y offset.</param>
        public Neighbour(int _nXOffset, int _nYOffset)
        {
            m_nXOffset = _nXOffset;
            m_nYOffset = _nYOffset;
        }

        /// <summary>
        /// Gets or sets the X offset.
        /// </summary>
        /// <value>The X offset.</value>
        public int XOffset
        {
            get { return m_nXOffset; }
            set { m_nXOffset = value; }
        }

        /// <summary>
        /// Gets or sets the Y offset.
        /// </summary>
        /// <value>The Y offset.</value>
        public int YOffset
        {
            get { return m_nYOffset; }
            set { m_nXOffset = value; }
        }

        /// <summary>
        /// Sets the pixel.
        /// </summary>
        /// <value>The pixel.</value>
        public Pixel Pixel
        {
            set { m_Pixel = value; }
        }

        /// <summary>
        /// Gets or sets the color.
        /// </summary>
        /// <value>The color.</value>
        public Color Color
        {
            get { return m_Pixel[m_nXOffset, m_nYOffset]; }
            set { m_Pixel[m_nXOffset, m_nYOffset] = value; }
        }
    }
}
